--This inserts into the storeUnitItems table all of the items that are allocated to the store.  It defaults the quantity to 0.
--Run this script after you have allocated the items out to the stores.
--USE CS4750S12 -- Use this for titan access
use [KorleBu_STA_Inventory] -- Use this for local machine and Ghana

insert into storeUnitItems (itemID, quantity, storeUnitID)

select
	I.itemID,
	0 [quantity],
	SU.storeUnitID
from
	Items I
	INNER JOIN storeUnits SU ON SU.storeId = I.storeId